package com.halfsword.creativecraft.recipe;

import com.halfsword.creativecraft.CreativeCraft;
import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class RecipeLoader
{
    public static final DeferredRegister<RecipeSerializer<?>> SERIALIZERS =
            DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, CreativeCraft.MOD_ID);
    public static final RegistryObject<RecipeSerializer<SpaceCollectorRecipe>> SPACE_COLLECTOR_SERIALIZER =
            SERIALIZERS.register("unified_space_collector",()->SpaceCollectorRecipe.Serializer.INSTANCE);
    public static final RegistryObject<RecipeSerializer<SteamCrusherRecipe>> STEAM_CRUSHER_SERIALIZER =
            SERIALIZERS.register("unfried_steam_crushing", () -> SteamCrusherRecipe.Serializer.INSTANCE);
    public static void register(IEventBus eventBus){
        SERIALIZERS.register(eventBus);
    }
}
